<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>注册码详情</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/style.css">
<script language=javascript>
	function selectAll() {
		var a = document.getElementsByName("checkbox");
		if (a[0].checked) {
			for ( var i = 0; i < a.length; i++) {
				if (a[i].type == "checkbox")
					a[i].checked = false;
			}
		} else {
			for ( var i = 0; i < a.length; i++) {
				if (a[i].type == "checkbox")
					a[i].checked = true;
			}
		}
	}
</script>
</head>
<body>
	<ul id="tabsmenu" class="tabsmenu">
		<li class="active"><a>用户详情</a></li>
	</ul>
	<div id="tab1" class="">
		<table id="rounded-corner">
			<thead>
				<tr>
					<c:if test="${teacher.permission=='0' }">
						<th>Username</th>
						<th>Password</th>
					</c:if>
					<th>Name</th>
					<th>Tele</th>
					<th>Dept</th>
					<th>Course</th>
					<c:if test="${teacher.permission=='0' }">
						<th>Permission</th>
						<th>LastTime</th>
						<th>Count</th>
						<th>Edit</th>
						<th>Delete</th>
					</c:if>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="teacherlist" var="var">
					<s:if test="#var.username !='admin'">
						<tr class="odd">
							<c:if test="${teacher.permission=='0' }">
								<td><s:property value="#var.username" /><br>
								</td>
								<td><s:property value="#var.password" /><br>
								</td>
							</c:if>
							<td><s:property value="#var.name" /><br>
							</td>
							<td><s:property value="#var.tele" /><br>
							</td>
							<td><s:property value="#var.dept" /><br>
							</td>
							<td><s:property value="#var.course" /><br>
							</td>
							<c:if test="${teacher.permission=='0' }">
								<td><s:property value="#var.permission" /><br>
								</td>
								<td><s:property value="#var.lasttime" /><br>
								</td>
								<td><s:property value="#var.count" /><br>
								</td>
								<td><a
									href="<%=basePath%>editUser?id=<s:property value="#var.AId" />">
										<img src="images/edit.png" alt="" title="" border="0" /> </a>
								</td>
								<td><a
									href="<%=basePath%>deleteteacher?id=<s:property value="#var.AId" />">
										<img src="images/trash.gif" alt="" title="" border="0" /> </a>
								</td>
							</c:if>
						</tr>
					</s:if>
				</s:iterator>
			</tbody>
		</table>
		<jsp:include page="./../common/pager.jsp">
			<jsp:param
				value='<%=request.getAttribute("javax.servlet.forward.request_uri") %>'
				name="url" />
			<jsp:param value="${pager.totalRecords }" name="items" />
			<jsp:param value="${pager.size }" name="size" />
		</jsp:include>
	</div>
</body>
</html>
